/*
This file is part of Cafca.

Cafca is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Cafca is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Cafca.  If not, see <http://www.gnu.org/licenses/>.

If you have any comment, suggestion or idea, do not hesitate to contact me at shenrotin@gmail.com
*/

package org.crag.cafca.logic;

import java.util.Vector;

import org.apache.log4j.Logger;
import org.crag.cafca.logic.time.TimeLine;

public class FamilyGroup 
{
	/**
	 * The log4J logger. See http://logging.apache.org/log4j/1.2/index.html for more info.
	 */
	@SuppressWarnings("unused")
	private static Logger log=Logger.getLogger(new Throwable().getStackTrace()[0].getClassName());

	/**
	 * Families in the group
	 */
	private Vector<Family> families;
	
	/**
	 * Timeline associated to this familygroup
	 */
	private TimeLine timeLine;
	
	/**
	 * Name of the group
	 */
	private String name;
	
	public FamilyGroup()
	{
		families=new Vector<Family>();
	}
	
	/**
	 * @return the families in the group
	 */
	public Vector<Family> getFamilies()
	{
		return families;
	}
	
	/**
	 * @return the number of families in the group
	 */
	public int getNbFamilies()
	{
		return families.size();
	}
	
	/**
	 * Use this function to add a family in the group
	 */
	public void addFamily(Family family)
	{
		families.add(family);
	}
	
	/**
	 * Use this function to remove a family from this group
	 */
	public void removeFamily(Family family)
	{
		families.remove(family);
	}

	/**
	 * @return the name of this group
	 */
	public String getName() 
	{
		return name;
	}

	/**
	 * Give a name to this group
	 * @param the name of the group
	 */
	public void setName(String name) 
	{
		this.name = name;
	}

	public TimeLine getTimeLine() 
	{
		return timeLine;
	}
}
